package saeildamil.ch18.thread;

import javax.swing.JOptionPane;

public class MultiThreadEx01 {
	public static void main(String[] args) {
		//0~0까지 쓰레드로 실행
		DigitThreadEx thread1 = new DigitThreadEx();
		DigitThreadEx thread2 = new DigitThreadEx();
		AlphabetThreadEx thread3 = new AlphabetThreadEx();
		
		thread1.start();
		thread2.start();
		thread3.start();
		//thread.start();//run()가 호출 Thread로 동작
		//thread.run() : run()메소드가 실행 Thread로 동작(x)
		//A~Z까지 메인 쓰레드 실행
		/*for(char i='A'; i<='Z'; i++){
			System.out.print(i + " ");
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
*/	
		JOptionPane.showMessageDialog(null, "main thread 종료");
	}
}
